<!-- IF S_AJAX_REVIEW -->
<h3>{L_POST_REVIEW}</h3>

<p>{L_POST_REVIEW_EXPLAIN}</p>

<!-- BEGIN post_review_row -->
<div id="ppr{post_review_row.POST_ID}" class="post <!-- IF post_review_row.S_ROW_COUNT is odd -->bg1<!-- ELSE -->bg2<!-- ENDIF --><!-- IF post_review_row.ONLINE_STATUS --> online<!-- ENDIF -->">
	<div class="inner"><span class="corners-top"><span></span></span>
	
	<div class="postbody">
		<h3><a href="#ppr{post_review_row.POST_ID}">{post_review_row.POST_SUBJECT}</a></h3>
		<p class="author"><!-- IF S_IS_BOT -->{post_review_row.MINI_POST_IMG}<!-- ELSE --><a href="{post_review_row.U_MINI_POST}">{post_review_row.MINI_POST_IMG}</a><!-- ENDIF --> {L_POST_BY_AUTHOR}<strong>  {post_review_row.POST_AUTHOR_FULL}</strong> {L_POSTED_ON_DATE} {post_review_row.POST_DATE}</p>
		<div class="content">{post_review_row.MESSAGE}</div>

		<!-- IF post_review_row.S_HAS_ATTACHMENTS -->
			<dl class="attachbox">
				<dt>{L_ATTACHMENTS}</dt>
				<!-- BEGIN attachment -->
					<dd>{post_review_row.attachment.DISPLAY_ATTACHMENT}</dd>
				<!-- END attachment -->
			</dl>
		<!-- ENDIF -->

	</div>
	
	<span class="corners-bottom"><span></span></span></div>
</div>
<!-- END post_review_row -->
<!-- ELSE -->
<script type="text/javascript">
// <![CDATA[
var force_submit = false;

function ajax_review()
{
	if(force_submit)
		return true;
	
	document.getElementById('postform').post.value = "{L_CHECKING_FOR_REPLIES}";
	var reg = /&t=(2)/;
	var t = reg.exec(document.getElementById('postform').action)[1];
	var topic_cur_post_id = document.getElementById('postform').topic_cur_post_id.value;
	
	// Create new JsHttpRequest object.
	var req = new JsHttpRequest("utf-8");
	// Code automatically called on load finishing.
	req.onreadystatechange = function()
	{
		if (req.readyState == 4)
		{
			if(req.responseJS && req.responseJS.success == true)
			{
				document.getElementById('ajax_review').innerHTML = req.responseText;
				document.getElementById('ajax_review').style.display = "block";
				document.location.hash = "ajax_review";
				document.getElementById('postform').topic_cur_post_id.value = req.responseJS.topic_cur_post_id;
				document.getElementById('postform').post.value = "{L_SUBMIT}";
			}
			else
			{
				document.getElementById('postform').post.value = "{L_SENDING}";
				document.getElementById('postform').post.click();
				force_submit = true;
			}
		}
	}
	// Prepare request object (automatically choose GET or POST).
	req.open(null, 'aljax.php', true);
	// Send data to backend.
	req.send( {mode:'post_review',t:t,topic_cur_post_id:topic_cur_post_id} );
	
	return false;
}
// ]]>
</script>
<!-- ENDIF -->